<?php

define('_VALID_MOS', 1);
define('_JEXEC', 1);

define('ABSLPATH1', dirname(__FILE__).'/');
$shorten_path1 = substr(ABSLPATH1, 0, -1);
$shorten_path1 .= "/administrator/components/com_virtuemart/classes/payment/ps_kreditor_language.php";
if(file_exists($shorten_path1))
{
	include_once($shorten_path1);
}
else
{
	define('ABSLPATH2', dirname(__FILE__).'/');
	$shorten_path2 = substr(ABSLPATH2, 0, -58);
	$shorten_path2 .= "/payment/ps_kreditor_language.php";	
	//echo $shorten_path . "<br>";
	
	if(file_exists($shorten_path2))
	{
		include_once($shorten_path2);
	}
	else
	{
		echo "REPORT THESE lines to Kreditor/Klarna technical support!<br>";
		echo "These include error where tried for ps_kreditor_language<br>";
		echo $shorten_path1 . "<br>" . $shorten_path2 . "<br>";
	}
}

$langInfo = new Singleton("Language");

//Why is this a duplication of the /payment/ps_kreditor_language.php file?
switch($_POST['lang'])
{
	case "SWE":
		$langInfo->TEXT_SOCIAL_NR = "Personnummer";
		$langInfo->TEXT_PAYMENT_GENDER = "Kön";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Årsinkomst";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Telefonnummer";
		$langInfo->TEXT_PAYMENT_EMAIL = "E-postadress";
		$langInfo->TEXT_PAYMENT_STREET_NAME = "Gatunamn";
		$langInfo->TEXT_PAYMENT_STREET_NUMBER = "Gatunummer";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Du måste godkänna villkoren";
		$langInfo->TEXT_INFO_MISSING = "Information saknas";
		break;
	
	case "ENG":
		$langInfo->TEXT_SOCIAL_NR = "Social Security No";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Annual Salary";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Phone number";
		$langInfo->TEXT_PAYMENT_EMAIL = "E-mail";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Need to accept conditions";
		$langInfo->TEXT_INFO_MISSING = "Information missing";
		break;
		
	case "FIN":
		$langInfo->TEXT_SOCIAL_NR = "Henkilötunnus";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Vuositulot";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Puhelinnumero";
		$langInfo->TEXT_PAYMENT_EMAIL = "Sähköpostiosoite";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Sinun täytyy hyväksyä ehdot";
		$langInfo->TEXT_INFO_MISSING = "Tietoja puuttuu";
		break;
	
	case "DNK":
	case "DKK":
		$langInfo->TEXT_SOCIAL_NR = "Personnummer";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Årsindkomst";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Telefonnummer";
		$langInfo->TEXT_PAYMENT_EMAIL = "E-mail";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Du skal godkende vilkårene";
		$langInfo->TEXT_INFO_MISSING = "Information savnes";
		break;
		
	case "NOK":
	case "NOR":
		$langInfo->TEXT_SOCIAL_NR = "Personnummer";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Årsinntekt";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Telefonnummer";
		$langInfo->TEXT_PAYMENT_EMAIL = "E-postadresse";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Du må godkjenne vilkårene";
		$langInfo->TEXT_INFO_MISSING = "Ufullstendige opplysninger";
		break;
		
	case "DEU":
		$langInfo->TEXT_SOCIAL_NR = "Geburtstag";
		$langInfo->TEXT_PAYMENT_GENDER = "Geschlecht";
		$langInfo->TEXT_PAYMENT_ANNUAL_SALARY = "Jahreseinkommen";
		$langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE = "Mobilnummer";
		$langInfo->TEXT_PAYMENT_EMAIL = "E-Mail";
		$langInfo->TEXT_PAYMENT_STREET_NAME = "Straße";
		$langInfo->TEXT_PAYMENT_STREET_NUMBER = "Hausnummer";
		$langInfo->TEXT_ACCEPT_CONDITIONS = "Sie müssen die AGB akzeptieren";
		$langInfo->TEXT_INFO_MISSING = "Keine Information vorhanden";
		break;
}

$strFinalError = $langInfo->TEXT_INFO_MISSING . ":\n";

if($_POST['val1'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_GENDER . "\n";// "* Need to accept conditions\n";
if($_POST['val2'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_SOCIAL_NR . "\n";// "* Social Security Number\n";
if($_POST['val3'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_ANNUAL_SALARY . "\n";// "* Annual Salary\n";
if($_POST['val4'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_PHONE_NR_MOBILE . "\n";// "* Phone Number\n";
if($_POST['val5'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_EMAIL . "\n";// "* E-mail\n";
if($_POST['val6'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_STREET_NAME . "\n";// "* Need to accept conditions\n";
if($_POST['val7'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_PAYMENT_STREET_NUMBER . "\n";// "* Need to accept conditions\n";
if($_POST['val8'] == 1)
	$strFinalError .= "* " . $langInfo->TEXT_ACCEPT_CONDITIONS . "\n";// "* Need to accept conditions\n";
	
echo $strFinalError;
?>
